<!DOCTYPE html>
<html>
	<head>
		<title>Administrative Area | Login</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="/css/bootstrap.css" rel="stylesheet" media="screen">
		<link href="/css/bootstrap-responsive.css" rel="stylesheet" media="screen">
		<link rel="stylesheet/less" type="text/css" href="/css/admin_login.less">
		<script type="text/javascript" src="/js/less-1.3.1.min.js"></script>
		<script src="/js/jquery-1.8.3.min.js"></script>
		<script src="/js/bootstrap.min.js"></script>
	</head>
	<body>
		<div class="messages">
			<?php $mess = Request::getMessages();?>
			<?php if(!$mess[1]){$mess[1] = $errors;}?>
			<?php if($mess[1]): ?>
				<div class="error">
					<?php foreach($mess[1] as $errors):?>
						<?=$errors;?><br>
					<?php endforeach;?>
				</div>
			<?php elseif($mess[0]):?>
				<div class="good">
					<?php foreach($mess[0] as $errors):?>
						<?=$errors;?><br>
					<?php endforeach;?>
				</div>
			<?php endif; ?>
		</div>
		<div class="container">
			<?php if(!$data['you_blocked']=="yes"):?>
			<form id="admin_login_form" class="form-signin" method="POST" action="/admin/login">
				<h4>Admin Login</h4>
				<input type="hidden" name="mod" value="account">
				<input type="hidden" name="act" value="do_login">
				<input type="text" name="data[login]" class="input-block-level" placeholder="Login" value="<?=$data['login']?>">
				<input type="password" name="data[password]" class="input-block-level" placeholder="Password">
				<div>
					<div class="pull-left"><a class="link-you-blocked" href="/admin/you_blocked">You account blocked?</a></div>
					<div class="pull-right"><input type="submit" class="btn btn-primary" value="Log In"></div>
				</div>
			</form>
			<?php else:?>
			<form id="admin_login_form" class="form-signin" method="POST" action="/admin/you_blocked">
				<h5>Enter you email for unblocked account</h5>
				<input type="hidden" name="mod" value="account">
				<input type="hidden" name="act" value="get_unblocked_email">
				<input type="text" name="data[email]" class="input-block-level" placeholder="Email">
				<div>
					<div class="pull-left"><a class="link-you-blocked" href="/admin/">Back to login</a></div>
					<div class="pull-right"><input type="submit" class="btn btn-primary" value="Send"></div>
				</div>
			</form>
			<?php endif;?>
		</div>
	</body>
</html>
